
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>系统配置 · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="12.html" />
    
    
    <link rel="prev" href="10.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="./">
            
                <a href="./">
            
                    
                    前言
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" >
            
                <span>
            
                    
                    [第一章 系统介绍]
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="1.html">
            
                <a href="1.html">
            
                    
                    系统介绍
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="2.html">
            
                <a href="2.html">
            
                    
                    功能特点
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" >
            
                <span>
            
                    
                    [第二章 快速上手]
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="3.html">
            
                <a href="3.html">
            
                    
                    源码地址
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="4.html">
            
                <a href="4.html">
            
                    
                    服务部署
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="5.html">
            
                <a href="5.html">
            
                    
                    集成开发
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4" data-path="6.html">
            
                <a href="6.html">
            
                    
                    源码测试
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" >
            
                <span>
            
                    
                    [第三章 架构分析]
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="7.html">
            
                <a href="7.html">
            
                    
                    系统架构
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="8.html">
            
                <a href="8.html">
            
                    
                    服务依赖关系
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="9.html">
            
                <a href="9.html">
            
                    
                    协议格式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.4" data-path="10.html">
            
                <a href="10.html">
            
                    
                    消息类型
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.4.5" data-path="11.html">
            
                <a href="11.html">
            
                    
                    系统配置
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.6" data-path="12.html">
            
                <a href="12.html">
            
                    
                    功能模块
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.7" data-path="13.html">
            
                <a href="13.html">
            
                    
                    SPI定制化
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" >
            
                <span>
            
                    
                    [第四章 深度进阶]
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="14.html">
            
                <a href="14.html">
            
                    
                    秘钥交换
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="15.html">
            
                <a href="15.html">
            
                    
                    握手及快速重连
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.3" data-path="16.html">
            
                <a href="16.html">
            
                    
                    绑定用户
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.4" data-path="17.html">
            
                <a href="17.html">
            
                    
                    消息推送流程
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5" data-path="18.html">
            
                <a href="18.html">
            
                    
                    HTTP代理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.6" data-path="19.html">
            
                <a href="19.html">
            
                    
                    消息分发
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.7" data-path="20.html">
            
                <a href="20.html">
            
                    
                    消息序列化
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.8" data-path="21.html">
            
                <a href="21.html">
            
                    
                    消息加密与压缩
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.9" data-path="22.html">
            
                <a href="22.html">
            
                    
                    线程池配置与定制
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.10" data-path="23.html">
            
                <a href="23.html">
            
                    
                    上行PUSH
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.11" data-path="24.html">
            
                <a href="24.html">
            
                    
                    广播推送与流控
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.12" data-path="25.html">
            
                <a href="25.html">
            
                    
                    广播推送条件过滤
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.13" data-path="26.html">
            
                <a href="26.html">
            
                    
                    消息ACK
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.14" data-path="27.html">
            
                <a href="27.html">
            
                    
                    离线消息
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.15" data-path="28.html">
            
                <a href="28.html">
            
                    
                    服务端启动流程分析
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.16" data-path="29.html">
            
                <a href="29.html">
            
                    
                    日志模块性能优化
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.17" data-path="30.html">
            
                <a href="30.html">
            
                    
                    JVM监控与性能分析
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" >
            
                <span>
            
                    
                    [第五章 关联服务]
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="31.html">
            
                <a href="31.html">
            
                    
                    Alloc服务
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2" data-path="32.html">
            
                <a href="32.html">
            
                    
                    MPNS
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7" >
            
                <span>
            
                    
                    [第六章 SDK接入]
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.1" data-path="33.html">
            
                <a href="33.html">
            
                    
                    服务端SDK
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2" data-path="34.html">
            
                <a href="34.html">
            
                    
                    Android SDK
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3" data-path="35.html">
            
                <a href="35.html">
            
                    
                    MPushClient(Java)
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.4" data-path="36.html">
            
                <a href="36.html">
            
                    
                    MPushClient(Swift)
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.5" data-path="37.html">
            
                <a href="37.html">
            
                    
                    MPushClient(Obj-C)
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.8" >
            
                <span>
            
                    
                    [第七章 常见问题]
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.8.1" data-path="38.html">
            
                <a href="38.html">
            
                    
                    常见问题
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.2" data-path="39.html">
            
                <a href="39.html">
            
                    
                    系统压测
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="." >系统配置</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="&#x7CFB;&#x7EDF;&#x914D;&#x7F6E;">&#x7CFB;&#x7EDF;&#x914D;&#x7F6E;</h1>
<pre><code>##################################################################################################################
#
# NOTICE&#xFF1A;
#
# &#x7CFB;&#x7EDF;&#x914D;&#x7F6E;&#x6587;&#x4EF6;&#xFF0C;&#x6240;&#x6709;&#x5217;&#x51FA;&#x7684;&#x9879;&#x662F;&#x7CFB;&#x7EDF;&#x6240;&#x652F;&#x6301;&#x5168;&#x90E8;&#x914D;&#x7F6E;&#x9879;
# &#x5982;&#x679C;&#x8981;&#x8986;&#x76D6;&#x67D0;&#x9879;&#x7684;&#x503C;&#x53EF;&#x4EE5;&#x6DFB;&#x52A0;&#x5230;mpush.conf&#x4E2D;&#x3002;
#
# &#x914D;&#x7F6E;&#x6587;&#x4EF6;&#x683C;&#x5F0F;&#x91C7;&#x7528;HOCON&#x683C;&#x5F0F;&#x3002;&#x89E3;&#x6790;&#x5E93;&#x7531;https://github.com/typesafehub/config&#x63D0;&#x4F9B;&#x3002;
# &#x5177;&#x4F53;&#x53EF;&#x53C2;&#x7167;&#x5668;&#x8BF4;&#x660E;&#x6587;&#x6863;&#xFF0C;&#x6BD4;&#x5982;&#x542B;&#x6709;&#x7279;&#x6B8A;&#x5B57;&#x7B26;&#x7684;&#x5B57;&#x7B26;&#x4E32;&#x5FC5;&#x987B;&#x7528;&#x53CC;&#x5F15;&#x53F7;&#x5305;&#x8D77;&#x6765;&#x3002;
#
##################################################################################################################

mp {
    #&#x57FA;&#x7840;&#x914D;&#x7F6E;
    home=${user.dir} //&#x7A0B;&#x5E8F;&#x5DE5;&#x4F5C;&#x76EE;&#x524D;

    #&#x65E5;&#x5FD7;&#x914D;&#x7F6E;
    log-level=warn
    log-dir=${mp.home}/logs
    log-conf-path=${mp.home}/conf/logback.xml

    #&#x6838;&#x5FC3;&#x914D;&#x7F6E;
    core {
        max-packet-size=10k //&#x7CFB;&#x7EDF;&#x5141;&#x8BB8;&#x4F20;&#x8F93;&#x7684;&#x6700;&#x5927;&#x5305;&#x7684;&#x5927;&#x5C0F;
        compress-threshold=10k //&#x6570;&#x636E;&#x5305;&#x542F;&#x7528;&#x538B;&#x7F29;&#x7684;&#x4E34;&#x754C;&#x503C;&#xFF0C;&#x8D85;&#x8FC7;&#x8BE5;&#x503C;&#x540E;&#x5BF9;&#x6570;&#x636E;&#x8FDB;&#x884C;&#x538B;&#x7F29;
        min-heartbeat=3m //&#x6700;&#x5C0F;&#x5FC3;&#x8DF3;&#x95F4;&#x9694;
        max-heartbeat=3m //&#x6700;&#x5927;&#x5FC3;&#x8DF3;&#x95F4;&#x9694;
        max-hb-timeout-times=2 //&#x5141;&#x8BB8;&#x7684;&#x5FC3;&#x8DF3;&#x8FDE;&#x7EED;&#x8D85;&#x65F6;&#x7684;&#x6700;&#x5927;&#x6B21;&#x6570;
        session-expired-time=1d //&#x7528;&#x4E8E;&#x5FEB;&#x901F;&#x91CD;&#x8FDE;&#x7684;session &#x8FC7;&#x671F;&#x65F6;&#x95F4;&#x9ED8;&#x8BA4;1&#x5929;
        epoll-provider=netty //nio:jdk&#x81EA;&#x5E26;&#xFF0C;netty:&#x7531;netty&#x5B9E;&#x73B0;
    }

    #&#x5B89;&#x5168;&#x914D;&#x7F6E;
    security {
        #rsa &#x79C1;&#x94A5;&#x3001;&#x516C;&#x94A5;key&#x957F;&#x5EA6;&#x4E3A;1024;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;&#x811A;&#x672C;bin/rsa.sh&#x751F;&#x6210;, @see com.mpush.tools.crypto.RSAUtils#main
        private-key=&quot;MIIBNgIBADANBgkqhkiG9w0BAQEFAASCASAwggEcAgEAAoGBAKCE8JYKhsbydMPbiO7BJVq1pbuJWJHFxOR7L8Hv3ZVkSG4eNC8DdwAmDHYu/wadfw0ihKFm2gKDcLHp5yz5UQ8PZ8FyDYvgkrvGV0ak4nc40QDJWws621dm01e/INlGKOIStAAsxOityCLv0zm5Vf3+My/YaBvZcB5mGUsPbx8fAgEAAoGAAy0+WanRqwRHXUzt89OsupPXuNNqBlCEqgTqGAt4Nimq6Ur9u2R1KXKXUotxjp71Ubw6JbuUWvJg+5Rmd9RjT0HOUEQF3rvzEepKtaraPhV5ejEIrB+nJWNfGye4yzLdfEXJBGUQzrG+wNe13izfRNXI4dN/6Q5npzqaqv0E1CkCAQACAQACAQACAQACAQA=&quot;
        public-key=&quot;MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCghPCWCobG8nTD24juwSVataW7iViRxcTkey/B792VZEhuHjQvA3cAJgx2Lv8GnX8NIoShZtoCg3Cx6ecs+VEPD2fBcg2L4JK7xldGpOJ3ONEAyVsLOttXZtNXvyDZRijiErQALMTorcgi79M5uVX9/jMv2Ggb2XAeZhlLD28fHwIDAQAB&quot;
        aes-key-length=16 //AES key &#x957F;&#x5EA6;
    }

    #&#x7F51;&#x7EDC;&#x914D;&#x7F6E;
    net {
        connect-server-port=3000 //&#x957F;&#x94FE;&#x63A5;&#x670D;&#x52A1;&#x5BF9;&#x5916;&#x7AEF;&#x53E3;, &#x516C;&#x7F51;&#x7AEF;&#x53E3;
        admin-server-port=3002 //&#x63A7;&#x5236;&#x53F0;&#x670D;&#x52A1;&#x7AEF;&#x53E3;, &#x5185;&#x90E8;&#x7AEF;&#x53E3;
        gateway-server-port=3001 //&#x7F51;&#x5173;&#x670D;&#x52A1;&#x7AEF;&#x53E3;, &#x5185;&#x90E8;&#x7AEF;&#x53E3;
        gateway-client-port=4000 //UDP &#x5BA2;&#x6237;&#x7AEF;&#x7AEF;&#x53E3;
        gateway-server-net=udp //&#x7F51;&#x5173;&#x670D;&#x52A1;&#x4F7F;&#x7528;&#x7684;&#x7F51;&#x7EDC;&#x7C7B;&#x578B;tcp/udp
        gateway-server-multicast=&quot;239.239.239.88&quot; //239.0.0.0&#xFF5E;239.255.255.255&#x4E3A;&#x672C;&#x5730;&#x7BA1;&#x7406;&#x7EC4;&#x64AD;&#x5730;&#x5740;&#xFF0C;&#x4EC5;&#x5728;&#x7279;&#x5B9A;&#x7684;&#x672C;&#x5730;&#x8303;&#x56F4;&#x5185;&#x6709;&#x6548;
        gateway-client-multicast=&quot;239.239.239.99&quot; //239.0.0.0&#xFF5E;239.255.255.255&#x4E3A;&#x672C;&#x5730;&#x7BA1;&#x7406;&#x7EC4;&#x64AD;&#x5730;&#x5740;&#xFF0C;&#x4EC5;&#x5728;&#x7279;&#x5B9A;&#x7684;&#x672C;&#x5730;&#x8303;&#x56F4;&#x5185;&#x6709;&#x6548;
        public-host-mapping { //&#x672C;&#x673A;&#x5C40;&#x57DF;&#x7F51;IP&#x548C;&#x516C;&#x7F51;IP&#x7684;&#x6620;&#x5C04;&#x5173;&#x7CFB;
            //&quot;10.0.10.156&quot;:&quot;111.1.32.137&quot;
            //&quot;10.0.10.166&quot;:&quot;111.1.33.138&quot;
        }
        traffic-shaping { //&#x6D41;&#x91CF;&#x6574;&#x5F62;&#x914D;&#x7F6E;
            gateway-client {
                enabled:true
                check-interval:100ms
                write-global-limit:30k
                read-global-limit:0
                write-channel-limit:3k
                read-channel-limit:0
            }

            gateway-server {
                enabled:true
                check-interval:100ms
                write-global-limit:0
                read-global-limit:30k
                write-channel-limit:0
                read-channel-limit:3k
            }

            connect-server {
                enabled:false
                check-interval:100ms
                write-global-limit:0
                read-global-limit:100k
                write-channel-limit:3k
                read-channel-limit:3k
            }
        }
    }

    #Zookeeper&#x914D;&#x7F6E;
    zk {
        server-address=&quot;127.0.0.1:2181&quot;
        namespace=mpush
        digest=mpush //zkCli.sh acl &#x547D;&#x4EE4; addauth digest mpush
        local-cache-path=/
        retry {
            #initial amount of time to wait between retries
            baseSleepTimeMs=3s
            #max number of times to retry
            maxRetries=3
            #max time in ms to sleep on each retry
            maxSleepMs=5s
        }
        connectionTimeoutMs=5s
        sessionTimeoutMs=5s
    }

    #Redis&#x96C6;&#x7FA4;&#x914D;&#x7F6E;
    redis {
        write-to-zk=false
        password=&quot;&quot;//your password
        cluster-model=single//single,cluster
        nodes:[]//[&quot;127.0.0.1:6379&quot;]&#x683C;&#x5F0F;ip:port:password,&#x5BC6;&#x7801;&#x53EF;&#x4EE5;&#x4E0D;&#x8BBE;&#x7F6E;ip:port
        config {
            maxTotal:8,
            maxIdle:4,
            minIdle:1,
            lifo:true,
            fairness:false,
            maxWaitMillis:5000,
            minEvictableIdleTimeMillis:300000,
            softMinEvictableIdleTimeMillis:1800000,
            numTestsPerEvictionRun:3,
            testOnCreate:false,
            testOnBorrow:false,
            testOnReturn:false,
            testWhileIdle:false,
            timeBetweenEvictionRunsMillis:60000,
            blockWhenExhausted:true,
            jmxEnabled:false,
            jmxNamePrefix:pool,
            jmxNameBase:pool
        }
    }

    #HTTP&#x4EE3;&#x7406;&#x914D;&#x7F6E;
    http {
        proxy-enabled=false //&#x542F;&#x7528;Http&#x4EE3;&#x7406;
        max-conn-per-host=5 //&#x6BCF;&#x4E2A;&#x57DF;&#x540D;&#x7684;&#x6700;&#x5927;&#x94FE;&#x63A5;&#x6570;, &#x5EFA;&#x8BAE;web&#x670D;&#x52A1;nginx&#x8D85;&#x65F6;&#x65F6;&#x95F4;&#x8BBE;&#x957F;&#x4E00;&#x70B9;, &#x4EE5;&#x4FBF;&#x4FDD;&#x6301;&#x957F;&#x94FE;&#x63A5;
        default-read-timeout=10s //&#x8BF7;&#x6C42;&#x8D85;&#x65F6;&#x65F6;&#x95F4;
        max-content-length=5m //response body &#x6700;&#x5927;&#x5927;&#x5C0F;
        dns-mapping { //&#x57DF;&#x540D;&#x6620;&#x5C04;&#x5916;&#x7F51;&#x5730;&#x5740;&#x8F6C;&#x5185;&#x90E8;IP, &#x57DF;&#x540D;&#x90E8;&#x5206;&#x4E0D;&#x5305;&#x542B;&#x7AEF;&#x53E3;&#x53F7;
            //&quot;mpush.com&quot;:[&quot;127.0.0.1:8080&quot;, &quot;127.0.0.1:8081&quot;]
        }
    }

    #&#x7EBF;&#x7A0B;&#x6C60;&#x914D;&#x7F6E;
    thread {
        pool {
            boss { //netty server boss
                min:1 //boss &#x53EA;&#x9700;&#x8981;&#x4E00;&#x4E2A;&#x7EBF;&#x7A0B;&#x5373;&#x53EF;
                max:1
                queue-size:0
            }

            work { //netty server boss
                min:0 //0&#x8868;&#x793A;&#x7EBF;&#x7A0B;&#x6570;&#x6839;&#x636E;cpu&#x6838;&#x6570;&#x52A8;&#x6001;&#x8C03;&#x6574;(2*cpu)
                max:0
                queue-size:0
            }

            event-bus {
                min:4
                max:4
                queue-size:10000 //&#x5927;&#x91CF;&#x7684;online&#xFF0C;offline&#xFF0C;
            }

            http-proxy {
                min:0 //0&#x8868;&#x793A;&#x7EBF;&#x7A0B;&#x6570;&#x6839;&#x636E;cpu&#x6838;&#x6570;&#x52A8;&#x6001;&#x8C03;&#x6574;(2*cpu)
                max:0
                queue-size:0
            }

            biz { //&#x5176;&#x4ED6;&#x4E1A;&#x52A1;
                min:1
                max:4
                queue-size:16
            }

            mq { //&#x7528;&#x6237;&#x4E0A;&#x4E0B;&#x7EBF;&#x6D88;&#x606F;, &#x8E22;&#x4EBA;&#x7B49;
                min:2
                max:4
                queue-size:10000
            }

            push-callback { //&#x6D88;&#x606F;&#x63A8;&#x9001;
                min:2
                max:2
                queue-size:0
            }

            push-center { //&#x6D88;&#x606F;&#x63A8;&#x9001;
                min:4
                max:4
                queue-size:0
            }
        }
    }

    #&#x63A8;&#x9001;&#x6D88;&#x606F;&#x6D41;&#x63A7;
    push {
       flow-control { //qps = limit/(duration)
            global:{ //&#x9488;&#x5BF9;&#x975E;&#x5E7F;&#x64AD;&#x63A8;&#x9001;&#x7684;&#x6D41;&#x63A7;&#xFF0C;&#x5168;&#x5C40;&#x6709;&#x6548;
                limit:5000 //qps = 5000
                max:0 //UN limit
                duration:1s //1s
            }

            broadcast:{ //&#x9488;&#x5BF9;&#x5E7F;&#x64AD;&#x6D88;&#x606F;&#x7684;&#x6D41;&#x63A7;&#xFF0C;&#x5355;&#x6B21;&#x4EFB;&#x52A1;&#x6709;&#x6548;
                limit:3000 //qps = 3000
                max:100000 //10w
                duration:1s //1s
            }
       }
    }

    #&#x7CFB;&#x7EDF;&#x76D1;&#x63A7;&#x914D;&#x7F6E;
    monitor {
        dump-dir=${mp.home}/tmp
        dump-stack=false //&#x662F;&#x5426;&#x5B9A;&#x65F6;dump&#x5806;&#x6808;
        dump-period=1m  //&#x591A;&#x4E45;&#x76D1;&#x63A7;&#x4E00;&#x6B21;
        print-log=true //&#x662F;&#x5426;&#x6253;&#x5370;&#x76D1;&#x63A7;&#x65E5;&#x5FD7;
        profile-enabled=true //&#x5F00;&#x542F;&#x6027;&#x80FD;&#x76D1;&#x63A7;
        profile-slowly-duration=10ms //&#x8017;&#x65F6;&#x8D85;&#x8FC7;10ms&#x6253;&#x5370;&#x65E5;&#x5FD7;
    }

    #SPI&#x6269;&#x5C55;&#x914D;&#x7F6E;
    spi {
        thread-pool-factory:&quot;com.mpush.tools.thread.pool.DefaultThreadPoolFactory&quot;
        dns-mapping-manager:&quot;com.mpush.common.net.HttpProxyDnsMappingManager&quot;
    }
}
</code></pre>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="10.html" class="navigation navigation-prev " aria-label="Previous page: 消息类型">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="12.html" class="navigation navigation-next " aria-label="Next page: 功能模块">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"系统配置","level":"1.4.5","depth":2,"next":{"title":"功能模块","level":"1.4.6","depth":2,"path":"12.md","ref":"12.md","articles":[]},"previous":{"title":"消息类型","level":"1.4.4","depth":2,"path":"10.md","ref":"10.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["livereload"],"pluginsConfig":{"livereload":{},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"11.md","mtime":"2023-05-21T16:11:52.202Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2023-06-26T16:20:41.295Z"},"basePath":".","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="gitbook/gitbook.js"></script>
    <script src="gitbook/theme.js"></script>
    
        
        <script src="gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

